package com.ruoyi.teaching.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teaching.mapper.RepeatedStudentsMapper;
import com.ruoyi.teaching.domain.RepeatedStudents;
import com.ruoyi.teaching.service.IRepeatedStudentsService;

/**
 * 留级管理Service业务层处理
 * 
 * @author myh
 * @date 2024-03-25
 */
@Service
public class RepeatedStudentsServiceImpl implements IRepeatedStudentsService 
{
    @Autowired
    private RepeatedStudentsMapper repeatedStudentsMapper;

    /**
     * 查询留级管理
     * 
     * @param id 留级管理主键
     * @return 留级管理
     */
    @Override
    public RepeatedStudents selectRepeatedStudentsById(Long id)
    {
        return repeatedStudentsMapper.selectRepeatedStudentsById(id);
    }

    /**
     * 查询留级管理列表
     * 
     * @param repeatedStudents 留级管理
     * @return 留级管理
     */
    @Override
    public List<RepeatedStudents> selectRepeatedStudentsList(RepeatedStudents repeatedStudents)
    {
        return repeatedStudentsMapper.selectRepeatedStudentsList(repeatedStudents);
    }

    /**
     * 新增留级管理
     * 
     * @param repeatedStudents 留级管理
     * @return 结果
     */
    @Override
    public int insertRepeatedStudents(RepeatedStudents repeatedStudents)
    {
        repeatedStudents.setCreateTime(DateUtils.getNowDate());
        return repeatedStudentsMapper.insertRepeatedStudents(repeatedStudents);
    }

    /**
     * 修改留级管理
     * 
     * @param repeatedStudents 留级管理
     * @return 结果
     */
    @Override
    public int updateRepeatedStudents(RepeatedStudents repeatedStudents)
    {
        return repeatedStudentsMapper.updateRepeatedStudents(repeatedStudents);
    }

    /**
     * 批量删除留级管理
     * 
     * @param ids 需要删除的留级管理主键
     * @return 结果
     */
    @Override
    public int deleteRepeatedStudentsByIds(Long[] ids)
    {
        return repeatedStudentsMapper.deleteRepeatedStudentsByIds(ids);
    }

    /**
     * 删除留级管理信息
     * 
     * @param id 留级管理主键
     * @return 结果
     */
    @Override
    public int deleteRepeatedStudentsById(Long id)
    {
        return repeatedStudentsMapper.deleteRepeatedStudentsById(id);
    }
}
